@extends('home.layout.base')
@section('styles')
    <style>
        .content{
            color: #636363;
        }
        .shop-02 h2{
            font-size: 28px;
        }
        .envor-sorting-filters span.factive{
            border-bottom: 2px solid #E51B2C;
        }
        .envor-sorting-filters span.factive a,.envor-sorting-filters span a:hover{
            color: #E51B2C;
        }
        .envor-sorting .envor-sorting-filters span {
            padding: 0px 60px;
        }
    </style>
@endsection
@section('scripts')
@endsection
@section('content')
    <section style="padding: 0">
        <img src="{{ asset('image/new01.png') }}" alt="" class="img_ct">
    </section>
    <div class="envor-sorting" id="portfolio-sorting">
        <div class="envor-sorting-filters">
            <div class="container">
                @foreach($cates as $key=>$cate)
                    <span @if($params['cid'] == $cate['id']) class="factive" @endif><a href="{{ route('home.new.index',['cid' => $cate['id']]) }}">{{ $cate['name'] }}</a></span>
                @endforeach
            </div>
        </div>
    </div>
    <section class="mp50">
        <div class="container">
            <div class="shop-02">
                <div class="col-lg-12" style="display: inline-block">
                    @foreach($lists as $new)
                        <div class="envor-partner-1">
                            <a href="{{ route('home.new.show',['id' => $new['id']]) }}">
                            <figure><img src="{{ $new['thumb'] }}" alt=""></figure>
                            <p class="title">{{ $new['title'] }}</p>
                            <p class="desc">{{ $new['describe'] }}</p>
                            <div class="date">
                                <span class="day">{{ $new['created_at']->format('d') }}</span>
                                <span class="month">{{ $new['created_at']->format('Y-m') }}</span>
                            </div>
                            </a>
                        </div>
                    @endforeach
                </div>
                <div class="col-lg-12 mp35">
                    <div style="text-align: right;">{!! $lists->appends($params)->render() !!}</div>
                </div>
            </div>
        </div>
    </section>
@endsection

